package com.zzld.modules.wxsys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.abel533.mapper.Mapper;
import com.zzld.core.service.BaseServiceImpl;
import com.zzld.modules.wxsys.entity.WXAccount;
import com.zzld.modules.wxsys.service.IWXAccountService;


@Service("wxaccountService")
public class WXAccountServiceImpl extends  BaseServiceImpl<WXAccount>  implements IWXAccountService {
	@Autowired
	private Mapper<WXAccount> wxaccountMapper;
	

	
	public WXAccount findwxaccount(String appId,String appSecret) throws Exception {
		WXAccount entity=new WXAccount();
		entity.setAppId(appId);
		entity.setAppSecret(appSecret);
		List<WXAccount> account_list=wxaccountMapper.select(entity);
		if(account_list!=null && account_list.size()>0){
			return account_list.get(0);
		}
		return null;
	}
}
